using Microsoft.EntityFrameworkCore;
using Yi.Web.Model;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddControllers();
var conString= builder.Configuration.GetConnectionString("mysql");
builder.Services.AddDbContext<ZaoDbContext>(x => x.UseMySql(conString,ServerVersion.AutoDetect(conString)));
var app = builder.Build();
app.MapControllers();




app.Run();

